<div class="grid_12 user">
  <div class="grid_12 head alpha omega">
    <div class="grid_12 title">
      关于-<%= user.nick_name %>
    </div> 
    <% if flash[:success].present? %>
      <div id='success' class="grid_9">
        <div><%= flash[:success] %></div>
      </div>         
      <% end %>
    <div class="grid_12 line">
      <div class="grid_2">姓名</div>
      <div class="grid_9">
        <%= user.full_name %>
      </div>
    </div>
    <div class="grid_12 line">
      <div class="grid_2">性别</div>
      <div class="grid_9">
        <%= t user.sex %>
      </div>
    </div>
    <div class="grid_12 line">
      <div class="grid_2">手机号</div>
      <div class="grid_9">
        <%= user.mobile %>
      </div>
    </div>
    <div class="grid_12 line">
      <div class="grid_2">邮箱</div>
      <div class="grid_9">
        <%= user.email %>
      </div>
    </div> 
    <div class="grid_12 line">
    <div class="grid_2">分组</div>
      <div class="grid_9">
      <% user.groups.each do |group| %>
          <%= label_tag "group_#{group.id}" ,group.name %>
      <% end %>
      </div>
    </div>
  </div>
  <div class="grid_12 alpha body">  
    <div class="grid_12 line">
      <div class="grid_2">地址</div>
      <div class="grid_9">
        <%= user.address %>
      </div>
    </div> 
  </div>  
  <div class="grid_12 bottom">
    <div class="grid_10">
      <% if user.me?  %>
      <%= link_to "修改我的个人资料", edit_current_user_url(user), :class => :button,:title => '修改我的个人资料'  %><small>或
      <%= link_to "修改登录密码", edit_password_url(user), :class => :button,:title => '修改登录密码'  %><small>或</small><% end %><%= link_to "返回首页", root_url   %>
    </div>
  </div>  
</div>